<template>
  <div>
    <h1>{{ msg }}</h1>
    <button @click="fn">反转世界</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      msg: "hello,world",
    };
  },
  methods: {
    fn() {
      let a = this.msg.split("");
      console.log(a);
      let b = a.reverse();
      console.log(b);
      let c = b.join("");
      this.msg = c;
    },
  },
};
</script>

<style>
</style>